import axios from 'axios';

// 模拟获取预约数据
export const getAppointments = async () => {
  // 模拟请求延迟
  await new Promise(resolve => setTimeout(resolve, 500));
  return [
    { id: 1, date: '2023-10-01', department: '心血管内科', doctor: '李明', time: '08:30-09:00', status: '待就诊', remark: '请提前10分钟到院' },
    { id: 2, date: '2023-09-15', department: '呼吸与危重症医学科', doctor: '王芳', time: '10:00-10:30', status: '已完成', remark: '已就诊' },
    { id: 3, date: '2023-08-20', department: '骨科', doctor: '张伟', time: '09:00-09:30', status: '已取消', remark: '用户主动取消' },
    { id: 4, date: '2023-07-10', department: '普通外科', doctor: '李娜', time: '08:30-09:00', status: '待就诊', remark: '' },
    { id: 5, date: '2023-06-05', department: '妇科', doctor: '赵强', time: '08:30-09:00', status: '已完成', remark: '已就诊' }
  ];
};

// 模拟获取科室数据
export const getDepartments = async () => {
  await new Promise(resolve => setTimeout(resolve, 500));
  return [
    {
      name: '内科系统',
      icon: 'fas fa-user-md',
      subDepartments: [
        { name: '呼吸与危重症医学科', icon: 'fas fa-lungs', department: '呼吸与危重症医学科' },
        { name: '心血管内科', icon: 'fas fa-heartbeat', department: '心血管内科' },
        { name: '消化内科（含内镜中心）', icon: 'fas fa-stomach', department: '消化内科（含内镜中心）' },
        { name: '内分泌代谢科', icon: 'fas fa-vial', department: '内分泌代谢科' },
        { name: '肾脏内科', icon: 'fas fa-tint', department: '肾脏内科' },
        { name: '神经内科（国家临床重点专科）', icon: 'fas fa-brain', department: '神经内科（国家临床重点专科）' },
        { name: '血液科', icon: 'fas fa-syringe', department: '血液科' },
        { name: '风湿免疫科', icon: 'fas fa-bone', department: '风湿免疫科' },
        { name: '感染科', icon: 'fas fa-viruses', department: '感染科' },
        { name: '老年医学科', icon: 'fas fa-user-clock', department: '老年医学科' },
      ]
    },
    {
      name: '外科系统',
      icon: 'fas fa-procedures',
      subDepartments: [
        { name: '普通外科（胃肠/肝胆）', icon: 'fas fa-user-injured', department: '普通外科（胃肠/肝胆）' },
        { name: '骨科（四川省重点专科）', icon: 'fas fa-bone', department: '骨科（四川省重点专科）' },
        { name: '神经外科（国家临床重点专科）', icon: 'fas fa-brain', department: '神经外科（国家临床重点专科）' },
        { name: '心脏大血管外科', icon: 'fas fa-heart', department: '心脏大血管外科' },
        { name: '泌尿外科（四川省重点专科）', icon: 'fas fa-restroom', department: '泌尿外科（四川省重点专科）' },
        { name: '胸外科', icon: 'fas fa-lungs', department: '胸外科' },
        { name: '乳腺外科', icon: 'fas fa-ribbon', department: '乳腺外科' },
        { name: '器官移植中心（肝/肾）', icon: 'fas fa-dna', department: '器官移植中心（肝/肾）' },
      ]
    },
    {
      name: '专科门诊',
      icon: 'fas fa-stethoscope',
      subDepartments: [
        { name: '妇科', icon: 'fas fa-venus', department: '妇科' },
        { name: '产科', icon: 'fas fa-baby', department: '产科' },
        { name: '辅助生殖医学中心', icon: 'fas fa-baby-carriage', department: '辅助生殖医学中心' },
        { name: '新生儿科', icon: 'fas fa-baby', department: '新生儿科' },
        { name: '儿童内科', icon: 'fas fa-child', department: '儿童内科' },
        { name: '小儿外科', icon: 'fas fa-child', department: '小儿外科' },
        { name: '肿瘤内科', icon: 'fas fa-ribbon', department: '肿瘤内科' },
        { name: '肿瘤外科', icon: 'fas fa-ribbon', department: '肿瘤外科' },
        { name: '放疗科', icon: 'fas fa-radiation', department: '放疗科' },
        { name: '眼科（国家临床重点专科）', icon: 'fas fa-eye', department: '眼科（国家临床重点专科）' },
        { name: '耳鼻咽喉头颈外科', icon: 'fas fa-head-side-mask', department: '耳鼻咽喉头颈外科' },
        { name: '口腔科', icon: 'fas fa-tooth', department: '口腔科' },
        { name: '皮肤科（含性病研究所）', icon: 'fas fa-allergies', department: '皮肤科（含性病研究所）' },
      ]
    },
    {
      name: '特色诊疗中心',
      icon: 'fas fa-star-of-life',
      subDepartments: [
        { name: '健康管理中心（全国TOP2）', icon: 'fas fa-heart', department: '健康管理中心（全国TOP2）' },
        { name: '全科医学中心', icon: 'fas fa-user-md', department: '全科医学中心' },
        { name: '心身医学中心（心理卫生）', icon: 'fas fa-brain', department: '心身医学中心（心理卫生）' },
        { name: '康复医学科（含高压氧）', icon: 'fas fa-wheelchair', department: '康复医学科（含高压氧）' },
      ]
    },
    {
      name: '医技科室',
      icon: 'fas fa-microscope',
      subDepartments: [
        { name: '放射科（含CT/MRI）', icon: 'fas fa-x-ray', department: '放射科（含CT/MRI）' },
        { name: '超声医学科', icon: 'fas fa-wave-square', department: '超声医学科' },
        { name: '核医学科', icon: 'fas fa-atom', department: '核医学科' },
        { name: '检验科', icon: 'fas fa-vials', department: '检验科' },
        { name: '病理科', icon: 'fas fa-notes-medical', department: '病理科' },
      ]
    }
  ];
};

// 模拟获取医生数据
export const getDoctors = async () => {
  await new Promise(resolve => setTimeout(resolve, 500));
  return [
    { id: 1, name: '李明', title: '主任医师', specialty: '心血管内科', department: '心血管内科', price: 80 },
    { id: 2, name: '王芳', title: '副主任医师', specialty: '呼吸与危重症医学科', department: '呼吸与危重症医学科', price: 50 },
    { id: 3, name: '张伟', title: '主治医师', specialty: '骨科', department: '骨科', price: 30 },
    { id: 4, name: '李娜', title: '副主任医师', specialty: '普通外科', department: '普通外科', price: 50 },
    { id: 5, name: '赵强', title: '主任医师', specialty: '妇科', department: '妇科', price: 80 }
  ];
}; 